<?php
    $items = $this->modules;
    
    if(is_array($items)) :
?>
<h2>Registered Modules </h2>

<table>
    <tr>
        <th>Username</th>
        <th>Full name</th>
        <th>Module name</th>
        <th>Group id</th>
        <th></th>
    </tr>
<?php
    foreach ($items as $item):
?>
    <tr>
        <td><?php echo $item['username']; ?></td>
        <td><?php echo $item['user_full_name']; ?></td>
        <td><?php echo $item['module_name']; ?></td>
        <td><?php echo $item['group_id']; ?></td>
        <td><a href="<?php echo $this->url('module/process', array('controller' => 'modulesusers', 'action' => 'disable'), array('query' => array('id' => $item['mid']))); ?>">Disable</a> | <a href="<?php echo $this->url('module/process', array('controller' => 'modulesusers', 'action' => 'unregister'), array('query' => array('uid' => $item['uid'], 'mid' => $item['mid']))); ?>">UnRegister</a></td>
    </tr>
<?php endforeach; ?>

</table>
<?php else: ?>
<?php \Zend\Debug\Debug::dump($item); ?>
<?php endif; ?>
